<template>
	<view class="right_window">
		<view class="window_Divider"></view>
		<statistics ref="statistics"></statistics>
	</view>
</template>

<script>
	import { defineAsyncComponent } from 'vue'
	const statistics = defineAsyncComponent(() => import('@/pages/statistics/statistics.vue'))
	export default {
		components:{
			statistics
		},
		data() {
			return {
			}
		},
		created(e) {
			this.$nextTick(()=>{
				if(uni.getWindowInfo().windowWidth>=961){
					// 监听自定义事件，该事件由详情页列表的点击触发
					uni.$on('updateStatistics', () => {
						// 执行页面的updateTimeData方法   先用 defineExpose 暴露出来
						if("updateTimeData" in this.$refs.statistics)this.$refs.statistics.updateTimeData();
					})
				}
			})
		},
		onUnload(){
			uni.$off('updateStatistics')
		},
		methods:{
		}
	}
</script>
	
<style lang="scss" scoped>
	@import "@/style/base.scss";
	.right_window{
		position: relative;
		.window_Divider{
			position: absolute;
			z-index: 10;
			top: 0;
			left: 0;
			transform: translate(-50%,0);
			height: calc(max(101% , 100vh));
			width: 1rpx;
			background: $baseColor_mid;
		}
		::v-deep .statistics{
			display: flex;
			flex-direction:row;
			flex-wrap: wrap;
			justify-content: space-around ;
			.index_list_box {
				width: 47%;
			}
		}
	}
	
</style>
